package com.itheima.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.pojo.Student;
import com.itheima.pojo.StudentQueryParam;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;

import java.util.List;
import java.util.Map;

@Mapper
public interface StudentMapper extends BaseMapper<Student> {

   /* //4.1 学员列表查询
    List<Student> getByPage(StudentQueryParam queryParam);

    //4.2 删除学员
    void deleteByIds(List<Integer> ids);

    //4.3 添加学员
    void insertStudent(Student student);

    //4.4 根据id查询
    @Options(useGeneratedKeys = true,keyProperty = "id")
    Student getById(Integer id);


    //4.5 修改学员
    void update(Student student);

    //4.6 违纪处理
    void updateViolation(Integer id, Integer violationCount, Integer violationScore);


    //根据班级id查询学员数
    Integer getCountByClazzId(Integer clazzId);

    */
   //学员学历统计
   @MapKey("name")
   List<Map> studentDegreeData();

    //班级人数统计
    @MapKey("name")
    List<Map> studentCountData();
}

